from demo_python_pkg.person_node import PersonNode
import rclpy
from rclpy.node import Node

class WriterNode(PersonNode):
    def __init__(self,name:str,age:int,book:str) -> None:
        print('WriterNode __init__ 方法被调用了')
        super().__init__(name,name,age)#调用父类的__init__
        self.book = book


def main():
    rclpy.init()
    node = WriterNode('zhangsanni',18,'论我的头发是真发')
    node.eat('鱼香肉丝')
    rclpy.spin(node)
    rclpy.shutdown()